<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<!-- Set render engine for 360 browser -->
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- HTML5 shim for IE8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	<![endif]-->



	<link href="__TMPL__/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet">
	<link href="__STATIC__/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<!--[if lt IE 9]>
	<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->
	<style>
		form .input-order {
			margin-bottom: 0px;
			padding: 0 2px;
			width: 42px;
			font-size: 12px;
		}

		form .input-order:focus {
			outline: none;
		}

		.table-actions {
			margin-top: 5px;
			margin-bottom: 5px;
			padding: 0px;
		}

		.table-list {
			margin-bottom: 0px;
		}

		.form-required {
			color: red;
		}
	</style>
	<script type="text/javascript">
        //全局变量
        var GV = {
            ROOT: "__ROOT__/",
            WEB_ROOT: "__WEB_ROOT__/",
            JS_ROOT: "static/js/",
            APP: '{$Request.module}'/*当前应用名*/
        };
	</script>
	<script src="__TMPL__/public/assets/js/jquery-1.10.2.min.js"></script>
	<script src="__STATIC__/js/wind.js"></script>
	<script src="__TMPL__/public/assets/js/bootstrap.min.js"></script>
	<script>
        Wind.css('artDialog');
        Wind.css('layer');
        $(function () {
            $("[data-toggle='tooltip']").tooltip({
                container:'body',
                html:true,
            });
            $("li.dropdown").hover(function () {
                $(this).addClass("open");
            }, function () {
                $(this).removeClass("open");
            });
        });
	</script>
	<if condition="APP_DEBUG">
		<style>
			#think_page_trace_open {
				z-index: 9999;
			}
		</style>
	</if>
	<link href="__TMPL__/public/assets/css/theme.min.css" rel="stylesheet">
	<link href="__TMPL__/public/assets/css/style.css" rel="stylesheet">
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
	        <li><a href="{:url('admin/order/index')}">订单列表</a></li>
			<li class="active"><a href="#">查看订单</a></li>
	    </ul>
		<div class="order-box">		
			<h4 class="well">基本信息</h4>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tr>
					<th align="right" width=300>订单号：</th>
					<td>{$order_data.order_id}</td>
					<th align="right" width=300>订单状态：</th>
					<td>{$order_status_arr[$order_data['order_status']]} / {$pay_status_arr[$order_data['pay_status']]} / {$shipping_status_arr[$order_data['shipping_status']]}</td>
				</tr>
				<tr>
					<th align="right" width=300>会员：</th>
					<td>{$order_data.user_nickname}</td>
					<th align="right" width=300>下单时间：</th>
					<td>{$order_data.create_time|date='Y-m-d H:i:s',###}</td>
				</tr>
				<tr>
					<th align="right" width=300>支付方式：</th>
					<td>
						<if condition="$order_data.pay_type eq 1">
							余额
							<elseif condition="$order_data.pay_type eq 2"/>
							微信
							<elseif condition="$order_data.pay_type eq 3"/>
							支付宝
						</if>
					</td>
					<th align="right" width=300>付款时间：</th>
					<td><if condition="empty($order_data['pay_time'])"><else />{$order_data.pay_time|date='Y-m-d H:i:s',###}</if></td>
				</tr>
				<tr>
					<th align="right" width=300>支付金额：</th>
					<td>{$order_data.pay_money}</td>
					<th align="right" width=300>发货时间：</th>
					<td><if condition="empty($order_data['shipping_time'])"><else />{$order_data.shipping_time|date='Y-m-d H:i:s',###}</if></td>
				</tr>
			</table>
			<h4 class="well">收货人信息<a href="{:url('Goods/AdminOrder/editaddress',array('order_id'=>$order_data['order_id']))}"><i class="fa fa-pencil"></i></a></h4>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tr>
					<th align="right" width=300>收货人：</th>
					<td>{$order_data.consignee}</td>
					<th align="right" width=300>联系电话：</th>
					<td>{$order_data.mobile}</td>
				</tr>
				<tr>
					<th align="right" width=300>收货地址：</th>
					<td>{$order_data.address}</td>
					<th align="right" width=300>配送物流：</th>
					<td>{$order_data.shipping_name}</td>
				</tr>				
			</table>
			<h4 class="well">商品信息</h4>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tr>
					<th>商品名称</th>
					<th>商品规格</th>
					<th>数量</th>
					<th>商品单价</th>
					<th>商品小计</th>
				</tr>
				<foreach name="order_sub_data" item="vo">
				<tr>
					<td align="center">{$vo.goods_name}</td>
					<td width="250" align="center">{$vo.spec_item_name}</td>
					<td width="200" align="center">{$vo.goods_number}</td>
					<td width="200" align="center">¥{$vo.vip_money}</td>
					<td width="200" align="center">¥{$vo.goods_number*$vo.vip_money|sprintf='%.2f',###}</td>
				</tr>
				</foreach>
				<tr>
					<td colspan=5 align="right" style="padding-right:50px;">合计：¥{$order_data.goods_price}</td>
				</tr>
			</table>
			<h4 class="well">费用信息<a href="{:url('Goods/AdminOrder/editprice',array('order_id'=>$order_data['order_id']))}"><i class="fa fa-pencil"></i></a></h4>
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tr>
					<td align="center">总计：¥{$order_data.goods_price}</td>
				</tr>
				<tr>
					<td align="center">运费：¥{$order_data.shipping_price}</td>
				</tr>
				<tr>
					<td align="center">应付：¥{$order_data.pay_money}</td>
				</tr>
			</table>
			<h4 class="well">操作</h4>
			<form class="js-ajax-form" action="" method="post">
			<table style="width:100%;" border="0" cellspacing="1" cellpadding="6">
				<tr>
					<th align="right" width="200">操作备注：</th>
					<td>
						<textarea name="note" id="" style="width:500px;height:50px;">{$order_data.admin_note|default=''}</textarea>
					</td>
				</tr>
				<tr>
					<th align="right" width="200">当前可执行操作：</th>
					<td>
						<foreach name="order_btn" item="v" key="k">
							<if condition="$k eq 'void'">
								<span style="color:red;">{$v}</span>
							<elseif condition="$k eq 'ship'" />
								<a class="btn btn-primary" href="{:url('admin/order/shipInfo',array('id'=>$order_data['id']))}" style="margin-right:10px;">{$v}</a>
							<elseif condition="$k eq 'refund'" />
								<a  class="btn btn-primary js-ajax-dialog-btn" data-msg="退款后用户资金将原路退回，确定执行吗？" href="{:url('admin/order/orderRefund',array('id'=>$order_data['id']))}" style="margin-right:10px;">{$v}</a>
							<else />
								<button type="submit" class="btn btn-primary js-ajax-submit" data-action="{:url('admin/order/orderOperate',array('id'=>$order_data['id'],'type'=>$k))}" style="margin-right:10px;">{$v}</button>
							</if>
						</foreach>
						   <button type="button" class="btn" onclick="history.back(-1)">返回</button>
					</td>
				</tr>
			</table>
			</form>
		</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script src="__STATIC__/js/myajax.js"></script>
</body>
</html>